package com.ctrip.corp.obt.shard.constants;

/**
 * @author marco.zheng
 * @version 1.0
 * @date 2022/01/14
 * @description 分片模式
 * @see
 * @since 1.0
 */
public enum ShardMode {

    /**
     * 不进行物理分片
     */
    NONE(0, "none"),
    /**
     * 数据库分片
     */
    DATABASE(1, "database"),
    /**
     * 表分片
     */
    TABLE(2, "table");

    private Integer value;

    private String name;

    ShardMode(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }


    public String getName() {
        return name;
    }

}
